Integrand size = 23, antiderivative size = 100 \[ \int \left (a+b \sec ^2(e+f x)\right )^2 \tan ^5(e+f x) \, dx=-\frac {a^2 \log (\cos (e+f x))}{f}-\frac {a (a-b) \sec ^2(e+f x)}{f}+\frac {\left (a^2-4 a b+b^2\right ) \sec ^4(e+f x)}{4 f}+\frac {(a-b) b \sec ^6(e+f x)}{3 f}+\frac {b^2 \sec ^8(e+f x)}{8 f} \]
[Out]
Time = 0.13 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {4223, 457, 90} \[ \int \left (a+b \sec ^2(e+f x)\right )^2 \tan ^5(e+f x) \, dx=\frac {\left (a^2-4 a b+b^2\right ) \sec ^4(e+f x)}{4 f}-\frac {a^2 \log (\cos (e+f x))}{f}+\frac {b (a-b) \sec ^6(e+f x)}{3 f}-\frac {a (a-b) \sec ^2(e+f x)}{f}+\frac {b^2 \sec ^8(e+f x)}{8 f} \]
[In]
[Out]
Rule 90
Rule 457
Rule 4223
Rubi steps \begin{align*} \text {integral}& = -\frac {\text {Subst}\left (\int \frac {\left (1-x^2\right )^2 \left (b+a x^2\right )^2}{x^9} \, dx,x,\cos (e+f x)\right )}{f} \\ & = -\frac {\text {Subst}\left (\int \frac {(1-x)^2 (b+a x)^2}{x^5} \, dx,x,\cos ^2(e+f x)\right )}{2 f} \\ & = -\frac {\text {Subst}\left (\int \left (\frac {b^2}{x^5}+\frac {2 (a-b) b}{x^4}+\frac {a^2-4 a b+b^2}{x^3}-\frac {2 a (a-b)}{x^2}+\frac {a^2}{x}\right ) \, dx,x,\cos ^2(e+f x)\right )}{2 f} \\ & = -\frac {a^2 \log (\cos (e+f x))}{f}-\frac {a (a-b) \sec ^2(e+f x)}{f}+\frac {\left (a^2-4 a b+b^2\right ) \sec ^4(e+f x)}{4 f}+\frac {(a-b) b \sec ^6(e+f x)}{3 f}+\frac {b^2 \sec ^8(e+f x)}{8 f} \\ \end{align*}
Time = 0.53 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.26 \[ \int \left (a+b \sec ^2(e+f x)\right )^2 \tan ^5(e+f x) \, dx=-\frac {\cos ^4(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \left (24 a^2 \log (\cos (e+f x))+24 a (a-b) \sec ^2(e+f x)-6 \left (a^2-4 a b+b^2\right ) \sec ^4(e+f x)-8 (a-b) b \sec ^6(e+f x)-3 b^2 \sec ^8(e+f x)\right )}{6 f (a+2 b+a \cos (2 e+2 f x))^2} \]
[In]
[Out]
Time = 9.06 (sec) , antiderivative size = 86, normalized size of antiderivative = 0.86
method | result | size |
parts | \(\frac {a^{2} \left (\frac {\tan \left (f x +e \right )^{4}}{4}-\frac {\tan \left (f x +e \right )^{2}}{2}+\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2}\right )}{f}+\frac {b^{2} \left (\frac {\tan \left (f x +e \right )^{8}}{8}+\frac {\tan \left (f x +e \right )^{6}}{6}\right )}{f}+\frac {a b \tan \left (f x +e \right )^{6}}{3 f}\) | \(86\) |
derivativedivides | \(\frac {\frac {b^{2} \sec \left (f x +e \right )^{8}}{8}+\frac {b \sec \left (f x +e \right )^{6} a}{3}-\frac {b^{2} \sec \left (f x +e \right )^{6}}{3}+\frac {a^{2} \sec \left (f x +e \right )^{4}}{4}-a b \sec \left (f x +e \right )^{4}+\frac {\sec \left (f x +e \right )^{4} b^{2}}{4}-a^{2} \sec \left (f x +e \right )^{2}+\sec \left (f x +e \right )^{2} a b +a^{2} \ln \left (\sec \left (f x +e \right )\right )}{f}\) | \(117\) |
default | \(\frac {\frac {b^{2} \sec \left (f x +e \right )^{8}}{8}+\frac {b \sec \left (f x +e \right )^{6} a}{3}-\frac {b^{2} \sec \left (f x +e \right )^{6}}{3}+\frac {a^{2} \sec \left (f x +e \right )^{4}}{4}-a b \sec \left (f x +e \right )^{4}+\frac {\sec \left (f x +e \right )^{4} b^{2}}{4}-a^{2} \sec \left (f x +e \right )^{2}+\sec \left (f x +e \right )^{2} a b +a^{2} \ln \left (\sec \left (f x +e \right )\right )}{f}\) | \(117\) |
risch | \(i a^{2} x +\frac {2 i a^{2} e}{f}+\frac {-4 a^{2} {\mathrm e}^{14 i \left (f x +e \right )}+4 a b \,{\mathrm e}^{14 i \left (f x +e \right )}-20 a^{2} {\mathrm e}^{12 i \left (f x +e \right )}+8 a b \,{\mathrm e}^{12 i \left (f x +e \right )}+4 b^{2} {\mathrm e}^{12 i \left (f x +e \right )}-44 a^{2} {\mathrm e}^{10 i \left (f x +e \right )}+\frac {52 a b \,{\mathrm e}^{10 i \left (f x +e \right )}}{3}-\frac {16 b^{2} {\mathrm e}^{10 i \left (f x +e \right )}}{3}-56 a^{2} {\mathrm e}^{8 i \left (f x +e \right )}+\frac {80 a b \,{\mathrm e}^{8 i \left (f x +e \right )}}{3}+\frac {40 b^{2} {\mathrm e}^{8 i \left (f x +e \right )}}{3}-44 a^{2} {\mathrm e}^{6 i \left (f x +e \right )}+\frac {52 a b \,{\mathrm e}^{6 i \left (f x +e \right )}}{3}-\frac {16 b^{2} {\mathrm e}^{6 i \left (f x +e \right )}}{3}-20 a^{2} {\mathrm e}^{4 i \left (f x +e \right )}+8 a b \,{\mathrm e}^{4 i \left (f x +e \right )}+4 b^{2} {\mathrm e}^{4 i \left (f x +e \right )}-4 a^{2} {\mathrm e}^{2 i \left (f x +e \right )}+4 a b \,{\mathrm e}^{2 i \left (f x +e \right )}}{f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{8}}-\frac {a^{2} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}{f}\) | \(317\) |
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 99, normalized size of antiderivative = 0.99 \[ \int \left (a+b \sec ^2(e+f x)\right )^2 \tan ^5(e+f x) \, dx=-\frac {24 \, a^{2} \cos \left (f x + e\right )^{8} \log \left (-\cos \left (f x + e\right )\right ) + 24 \, {\left (a^{2} - a b\right )} \cos \left (f x + e\right )^{6} - 6 \, {\left (a^{2} - 4 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{4} - 8 \, {\left (a b - b^{2}\right )} \cos \left (f x + e\right )^{2} - 3 \, b^{2}}{24 \, f \cos \left (f x + e\right )^{8}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 190 vs. \(2 (85) = 170\).
Time = 1.13 (sec) , antiderivative size = 190, normalized size of antiderivative = 1.90 \[ \int \left (a+b \sec ^2(e+f x)\right )^2 \tan ^5(e+f x) \, dx=\begin {cases} \frac {a^{2} \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac {a^{2} \tan ^{4}{\left (e + f x \right )}}{4 f} - \frac {a^{2} \tan ^{2}{\left (e + f x \right )}}{2 f} + \frac {a b \tan ^{4}{\left (e + f x \right )} \sec ^{2}{\left (e + f x \right )}}{3 f} - \frac {a b \tan ^{2}{\left (e + f x \right )} \sec ^{2}{\left (e + f x \right )}}{3 f} + \frac {a b \sec ^{2}{\left (e + f x \right )}}{3 f} + \frac {b^{2} \tan ^{4}{\left (e + f x \right )} \sec ^{4}{\left (e + f x \right )}}{8 f} - \frac {b^{2} \tan ^{2}{\left (e + f x \right )} \sec ^{4}{\left (e + f x \right )}}{12 f} + \frac {b^{2} \sec ^{4}{\left (e + f x \right )}}{24 f} & \text {for}\: f \neq 0 \\x \left (a + b \sec ^{2}{\left (e \right )}\right )^{2} \tan ^{5}{\left (e \right )} & \text {otherwise} \end {cases} \]
[In]
[Out]
none
Time = 0.20 (sec) , antiderivative size = 147, normalized size of antiderivative = 1.47 \[ \int \left (a+b \sec ^2(e+f x)\right )^2 \tan ^5(e+f x) \, dx=-\frac {12 \, a^{2} \log \left (\sin \left (f x + e\right )^{2} - 1\right ) - \frac {24 \, {\left (a^{2} - a b\right )} \sin \left (f x + e\right )^{6} - 6 \, {\left (11 \, a^{2} - 8 \, a b - b^{2}\right )} \sin \left (f x + e\right )^{4} + 4 \, {\left (15 \, a^{2} - 8 \, a b - b^{2}\right )} \sin \left (f x + e\right )^{2} - 18 \, a^{2} + 8 \, a b + b^{2}}{\sin \left (f x + e\right )^{8} - 4 \, \sin \left (f x + e\right )^{6} + 6 \, \sin \left (f x + e\right )^{4} - 4 \, \sin \left (f x + e\right )^{2} + 1}}{24 \, f} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 431 vs. \(2 (94) = 188\).
Time = 1.89 (sec) , antiderivative size = 431, normalized size of antiderivative = 4.31 \[ \int \left (a+b \sec ^2(e+f x)\right )^2 \tan ^5(e+f x) \, dx=\frac {12 \, a^{2} \log \left ({\left | -\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} - \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 2 \right |}\right ) - 12 \, a^{2} \log \left ({\left | -\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} - \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} - 2 \right |}\right ) + \frac {25 \, a^{2} {\left (\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right )}^{4} + 248 \, a^{2} {\left (\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right )}^{3} + 984 \, a^{2} {\left (\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right )}^{2} + 1760 \, a^{2} {\left (\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right )} - 512 \, a b {\left (\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right )} - 256 \, b^{2} {\left (\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right )} + 1168 \, a^{2} - 1024 \, a b + 256 \, b^{2}}{{\left (\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 2\right )}^{4}}}{24 \, f} \]
[In]
[Out]
Time = 19.52 (sec) , antiderivative size = 124, normalized size of antiderivative = 1.24 \[ \int \left (a+b \sec ^2(e+f x)\right )^2 \tan ^5(e+f x) \, dx=\frac {{\mathrm {tan}\left (e+f\,x\right )}^4\,\left (\frac {{\left (a+b\right )}^2}{4}+\frac {b^2}{4}-\frac {b\,\left (a+b\right )}{2}\right )}{f}-\frac {{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (\frac {{\left (a+b\right )}^2}{2}+\frac {b^2}{2}-b\,\left (a+b\right )\right )}{f}-\frac {{\mathrm {tan}\left (e+f\,x\right )}^6\,\left (\frac {b^2}{6}-\frac {b\,\left (a+b\right )}{3}\right )}{f}+\frac {a^2\,\ln \left ({\mathrm {tan}\left (e+f\,x\right )}^2+1\right )}{2\,f}+\frac {b^2\,{\mathrm {tan}\left (e+f\,x\right )}^8}{8\,f} \]
[In]
[Out]